import {Injectable} from '@angular/core';
import {Http} from '@angular/http';
import 'rxjs/add/operator/map';

/*
 Generated class for the HttpServiceProvider provider.

 See https://angular.io/docs/ts/latest/guide/dependency-injection.html
 for more info on providers and Angular DI.
 */
@Injectable()
export class HttpServiceProvider {
  private apiConfig: string;

  constructor(public http: Http) {
    console.log('Hello HttpServiceProvider Provider');
    this.apiConfig = 'https://www.abc.com';
  }

  get(url) {
    return this.http.get(url);
  }

  post(url, body) {
    return this.http.post(url, body);
  }

  put(url, body) {
    return this.http.put(url, body);
  }

  delete(url, body) {
    return this.http.delete(url, body);
  }

}
